import 'package:flutter/cupertino.dart';

import '../models/global.dart';
import '../models/user.dart';

class UserState extends ChangeNotifier {
  User? get user => Global.profile.user;
  bool _dark = false;
  bool get isDark {
    return _dark;
  }
  set isDark(bool d) {
    _dark = d;
    notifyListeners();
  }

  get isLogin => user != null;

  set user(User? user) {
    Global.profile.user = user;
    notifyListeners();
  }
}
